home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / daemons / ipServer / RCS / stat.h,v.trash < prev    next >
Encoding:
Text File  |  1988-08-16  |  8.5 KB  |  172 lines

  1. head     1.2;
  2. access   ;
  3. symbols  ;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 1.2
  9. date     88.08.16.11.16.57;  author mendel;  state Exp;
  10. branches ;
  11. next     1.1;
  12.  
  13. 1.1
  14. date     88.04.27.09.01.50;  author brent;  state Exp;
  15. branches ;
  16. next     ;
  17.  
  18.  
  19. desc
  20. @Statistics defs
  21. @
  22.  
  23.  
  24. 1.2
  25. log
  26. @
  27. @
  28. text
  29. @/*
  30.  * stat.h --
  31.  *
  32.  *    Data structure declartions for recording statistics from the
  33.  *    Internet protocol modules.
  34.  *
  35.  * Copyright 1987 Regents of the University of California
  36.  * All rights reserved.
  37.  * Permission to use, copy, modify, and distribute this
  38.  * software and its documentation for any purpose and without
  39.  * fee is hereby granted, provided that the above copyright
  40.  * notice appear in all copies.  The University of California
  41.  * makes no representations about the suitability of this
  42.  * software for any purpose.  It is provided "as is" without
  43.  * express or implied warranty.
  44.  *
  45.  *
  46.  * $Header: stat.h,v 1.1 88/04/27 09:01:50 brent Exp $ SPRITE (Berkeley)
  47.  */
  48.  
  49. #ifndef _IPS_STAT
  50. #define _IPS_STAT
  51.  
  52. #include "spriteTime.h"
  53. #include "netInet.h"
  54.  
  55. /* constants */
  56.  
  57. /* data structures */
  58.  
  59. typedef struct {
  60.  
  61.     Time    startTime;        /* Time when server started. */
  62.  
  63.     struct {
  64.     unsigned int    totalRcv;    /* Total # of packets received. */
  65.     unsigned int    shortPacket;    /* Packet len. was smaller than the
  66.                     *  min. IP header size. */
  67.     unsigned int    shortHeader;    /* The headerLen value in the header
  68.                      * wass smaller that the min. header 
  69.                      * size. */
  70.     unsigned int    shortLen;    /* The headerLen was bigger than the
  71.                      * totalLen. */
  72.     unsigned int    badChecksum;    /* Checksum didn't match recomputed 
  73.                      * value.*/
  74.     unsigned int    fragsRcv;    /* # of packets received that were 
  75.                      * fragmented when they arrived. */
  76.     unsigned int    fragsDropped;    /* # of fragments received that were
  77.                      * dropped because they were replaced
  78.                      * by other fragments. */
  79.     unsigned int    fragsTimedOut;    /* # of fragments received that were
  80.                      * dropped because the other fragments
  81.                      * didn't arrive before the timeout.*/
  82.     unsigned int    fragTimeouts;    /* # of fragments reassembly timeouts.*/
  83.     unsigned int    fragsReass;    /* # of fragments that were 
  84.                      * reasssembled. */
  85.     unsigned int    forwards;    /* # of received packets that weren't
  86.                      * for us and had to be forwarded. */
  87.     unsigned int    cannotForward;    /* # of packets to be forwarded but
  88.                      * couldn't determine who to send to. */
  89.  
  90.     unsigned int    wholeSent;    /* # of unfragmented packets sent. */
  91.     unsigned int    fragOnSend;    /* # of packets that were fragmented 
  92.                      * before sent because they were too
  93.                      * big to send whole. */
  94.     unsigned int    fragsSent;    /* # of fragments sent. */
  95.     unsigned int    dontFragment;    /* # of packets to be sent that were
  96.                      * too big but couldn't be fragmented 
  97.                      * (DONT_FRAGMENT was set). */
  98.     } ip;
  99.  
  100.     struct {
  101.     unsigned int    total;
  102.     unsigned int    shortLen;
  103.     unsigned int    badChecksum;
  104.     unsigned int    badType;    /* # of packets that had a bad ICMP
  105.                      * request type. */
  106.     unsigned int    badCode;    /* # of packets with a bad ICMP code. */
  107.     unsigned int    redirectSent;    /* # of "redirect" packets sent out. */
  108.  
  109.     unsigned int    inHistogram[NET_ICMP_MAX_TYPE];    
  110.                     /* histogram of request types in 
  111.                      * incoming ICMP packets. */
  112.     unsigned int    outHistogram[NET_ICMP_MAX_TYPE];
  113.                     /* histogram of request types in 
  114.                      * outgoing ICMP packets. */
  115.     } icmp;
  116.  
  117.     struct {
  118.     struct {
  119.         unsigned int    total;
  120.         unsigned int    dataLen;    /* # of bytes sent. */
  121.     } send;
  122.     struct {
  123.         unsigned int    total;        /* total # received. */
  124.         unsigned int    dataLen;    /* total # of valid bytes 
  125.                          * received. */ 
  126.         unsigned int    shortLen;    /* bad length in header. */
  127.         unsigned int    badChecksum;    /* bad header checksum. */
  128.         unsigned int    daemon;        /* destined for rwhod, sunrpc
  129.                          * and route daemons. */
  130.         unsigned int    accepted;    /* a client wants the packet.*/
  131.         unsigned int    acceptLen;    /* # of bytes wanted. */
  132.     } recv;
  133.     } udp;
  134.  
  135.     struct {
  136.     unsigned int    connAttempts;    /* connections initiated */
  137.     unsigned int    accepts;    /* connections accepted */
  138.     unsigned int    connects;    /* connections established */
  139.     unsigned in/* # of bytes copied. */
  140.     } buffer;
  141.     } sock;
  142.  
  143.     struct {
  144.     unsigned int dispatchLoop;    /* # of times Fs_Dispatch is called. */
  145.     unsigned int routeCalls;    /* # of times Rte_FindOutNet is 
  146.                      * called. */
  147.     unsigned int routeCacheHits;    /* # of times the cache in 
  148.                      * Rte_FindOutNet is used. */
  149.     } misc;
  150.  
  151. } Stat_Info;
  152.  
  153. extern Stat_Info    stats;
  154. extern int        Stat_PrintInfo();
  155.  
  156. #endif _IPS_STAT
  157. @
  158.  
  159.  
  160. 1.1
  161. log
  162. @Initial revision
  163. @
  164. text
  165. @d18 1
  166. a18 1
  167.  * $Header: stat.h,v 6.0 87/09/08 15:58:33 andrew Stable $ SPRITE (Berkeley)
  168. d24 1
  169. a24 1
  170. #include "time.h"
  171. @
  172.